package org.ali.structuralpattern.proxypattern.proxy;

import org.ali.structuralpattern.proxypattern.color.Color;

/**
 * 静态代理
 */
public class ColorProxy1 implements Color {
    private final Color color;
    private final String name;

    public ColorProxy1(Color color, String name) {
        this.color = color;
        this.name = name;
    }

    @Override
    public void paint() {
        System.out.println("静态代理，访问者：" + name);
        color.paint();
    }
}
